import { Injectable } from '@nestjs/common';
export type User = any;
@Injectable()
export class AdminUsersService {
  private readonly users: User[];
  constructor() {
    this.users = [
      {
        id: 1,
        username: 'admin',
        password: '123456',
      },
      {
        id: 2,
        username: 'ceshi',
        password: 'ceshi',
      },
      {
        id: 3,
        username: 'xiaoming',
        password: '111111',
      },
    ];
  }

  async findOne(username: string): Promise<User | undefined> {
    return this.users.find((user) => user.username === username);
  }
}
